<link rel="stylesheet" type="text/css" href="/static/css/common.css">
<style type="text/css">
table{
	border-collapse: collapse;
}
tr td{
	border-bottom: 1px dashed #DDD;
}
.big-btn{
	width: 60px;
	height: 100px;
}
</style>

{pager count=$count pagesize=$pageSize page=$smarty.get.p pagelink="list?p=%d" list=5}

<table>
	<tr>
		<th>id</th>
		<th>名称</th>
		<th>操作</th>
		<th>删除</th>
	</tr>
	{foreach from=$arrList item=item}
	<tr>
		<td>{$item.id}</td>
		<td>{$item.name}</td>
		<td width="400">
			<a href="show?id={$item.id}">查看</a> | 
			<a href="edit?id={$item.id}">编辑</a>
		</td>
		<td><button request="delete?id={$item.id}" click-hide="tr" class="big-btn">删除</button></td>
	</tr>
	{/foreach}
</table>

{pager count=$count pagesize=$pageSize page=$smarty.get.p pagelink="list?p=%d" list=5}

<script type="text/javascript" src="/static/js/jquery-1.7.1.js"></script>
<script type="text/javascript">
$('[request]').click(function(evt){
	$.get($(this).attr('request'));
});
$('[click-hide]').click(function(evt){
	var toHide = $(this).attr('click-hide');
	if(toHide){
		$(this).parents(toHide).hide();
	} else{
		$(this).hide();
	}
})
</script>
